﻿using System;
using System.Xml;
using InfoJetSoft.Service.Entity;
using InfoJetSoft.Service.Util;

namespace InfoJetSoft.Service.Worker
{
	
	class XSNViewFormatXdLayoutWorker
	{
		
		public static void  formatXdLayout(View view)
		{
			XmlElement root = view.Doc.DocumentElement;
			string xctName = NamespaceUtil.toFullName(view.XdPrefix, JetConstant.XD_xctname);
			string xdLayoutFilter = "//table";
			XmlNodeList xdLayoutXmlNodeList = DOMUtil.selectNodes(root, xdLayoutFilter, 0, view.NsResolver);
			foreach (XmlElement xdLayoutElement in xdLayoutXmlNodeList)
			{
				string style = xdLayoutElement.GetAttribute("class");
				if (style != null && style.IndexOf("xdLayout") >= 0)
				{
					xdLayoutElement.SetAttribute("border", "0");
				}
			}
		}
	}
}